(rmail-summary-get-new-mail): Only call
authorHenrik Enberg <henrik.enberg@telia.com>
Wed, 18 Jan 2006 11:47:19 +0000 (11:47 +0000)
committerHenrik Enberg <henrik.enberg@telia.com>
Wed, 18 Jan 2006 11:47:19 +0000 (11:47 +0000)
`rmail-summary-goto-msg' if no new mail was found.

lisp/mail/rmailsum.el

index d95a4201b7ffef89dfa1c283b953d2d22996adfc..3bc50c2fd11dfc8258b669acc1b57be7784e3f47 100644 (file)
@@ -1271,11 +1271,14 @@ argument says to read a file name and use that file as the inbox."
   (interactive
    (list (if current-prefix-arg
             (read-file-name "Get new mail from file: "))))
-  (let (current-message)
+  (let (current-message new-mail)
     (with-current-buffer rmail-buffer
-      (rmail-get-new-mail file-name)
-      (setq current-message rmail-current-message))
-    (rmail-summary-goto-msg current-message nil t)))
+      (setq new-mail (rmail-get-new-mail file-name)
+           current-message rmail-current-message))
+    ;; If new mail was found, display of the correct message was
+    ;; done elsewhere.
+    (unless new-mail
+      (rmail-summary-goto-msg current-message nil t))))
 
 (defun rmail-summary-input (filename)
   "Run Rmail on file FILENAME."